﻿using Basic.FormRemoteModel.QueryInter;
using Basic.FormRemoteModel.QueryInter.Model;
using Basic.FormRemoteModel.TableRecord;
using Basic.FormRemoteModel.TableRecord.Model;
using WeDonekRpc.Client.Attr;

namespace Basic.FlowExtendService.lmpl
{
    [ClassLifetimeAttr(ClassLifetimeType.SingleInstance)]
    internal class FormInterService : IFormInterService
    {
        public bool Save ( TableDataRow data )
        {
            return new AddTableRow
            {
                Row = data
            }.Send();
        }
        public Dictionary<long, FormVal> GetFormValues ( FormGetVals arg )
        {
            return new GetUserFormVals
            {
                Arg = arg
            }.Send();
        }
        public Dictionary<long, FormVal> GetFormValues ( FormValsGetArg arg )
        {
            return new GetUserFormValues
            {
                Arg = arg
            }.Send();
        }
        public FormVal GetFormValue ( FormValGetArg arg )
        {
            return new GetUserFormValue
            {
                Arg = arg
            }.Send();
        }
    }
}
